#ifndef _SERIALPORT_H_
#define _SERIALPORT_H_

#include <QVector>
#include <QSerialPort>
#include <QSerialPortInfo>

class SerialPort : public QObject {
    Q_OBJECT

public:
    explicit SerialPort(QObject *parent = nullptr);
    ~SerialPort();

    void openSerialPort();
    void closeSerialPort();
    void readData();
    void writeData(const QByteArray &data);
    QList<QSerialPortInfo> getSerialPortList();

private:
    QSerialPort *serial;





};

#endif // !_SERIALPORT_H_


